package com.czk.model.ptotorype.deepclone;

import com.czk.model.ptotorype.improve.Sheep;

public class Client {
    public static void main(String[] args) throws CloneNotSupportedException {
        BigSheep bigSheep=new BigSheep("妈妈","红色",new Sheep("儿子","绿色",5));
        System.out.println(bigSheep);
        BigSheep bigSheep1 =(BigSheep) bigSheep.clone();
        bigSheep1.setName("爸爸");
        System.out.println(bigSheep1);
        System.out.println(bigSheep);
        System.out.println(bigSheep.clone().hashCode());
        System.out.println(bigSheep.clone().hashCode());
        System.out.println(bigSheep.deepClone().hashCode());
        System.out.println(bigSheep.deepClone().hashCode());
    }
}
